package ru.usu.gv.gui.actions;

import ru.usu.gv.core.GraphCanvas;
import ru.usu.gv.uicomponents.UIGraph;
import ru.usu.gv.uicomponents.UIVertex;

/**
 @author Sergey Pupyrev 
 11.01.2007
 */

public class DeleteVertexAction extends ActionBase
{
    private UIVertex vertex;

    public DeleteVertexAction(UIVertex edge)
    {
        this.vertex = edge;
    }

    @Override
    public void execute()
    {
        vertex.delete();

        UIGraph currentGraph = GraphCanvas.getInstance().getCurrentGraph();
        currentGraph.draw();
    }
}
